package com.dragon.mmochat.message;

import com.dragon.mmochat.MmochatConstant;
import com.dragon.mmochat.model.role.MmochatPlayer;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.SkymobiProtocolMessage;

public class Mmochat_1_10S extends SkymobiProtocolMessage {
	MmochatPlayer me;

	public Mmochat_1_10S() {
		setMsgCode(MmochatConstant.MSGCODE_MMOCHAT_S_1_10);
	}

	@Override
	protected void encodeBody(SkymobiBuffer out) {
		out.putPrefixedString(me.getName(), 1);
		if (me.getCurChenHao() == null) {
			out.put((byte) 0);
		} else {
			out.putPrefixedString(me.getCurChenHaoInfo(), 1);
		}
	}

	public void setMe(MmochatPlayer me) {
		this.me = me;
	}

}